<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title>基本信息</title> 
    <link href="css/base.css" rel="stylesheet">
    <link rel="stylesheet" href="jquery-easyui-1.5.3/themes/default/easyui.css">
    <link href="jquery-easyui-1.5.3/themes/icon.css" rel="stylesheet">
    <link href="css/basic_info.css" rel="stylesheet">
    <link rel="stylesheet" href="css/xk.css">
    <script type="text/javascript" src="font_jjkmvgsdpk/iconfont.js"></script>
    <link rel="stylesheet" href="font_jjkmvgsdpk/iconfont.css">
    <link href="css/process.css" rel="stylesheet">
</head> 
<body>
 <div class="container">
   <div class="xk_submit" style="height: 24px;background-color: #eeeeee;text-align: center;">
    <button class="easyui-linkbutton" type="button" iconCls="icon-save" style="height: 24px;margin-left: 5px;">保存</button>
   </div>  
  <div class="content">
   <div style="margin-left: 1%;background: linear-gradient(to bottom,#ffffff 0,#F2F2F2 100%);height: 28px;line-height: 28px;border: 1px solid #CCCCCC;padding-left: 5px;">
   <ul id="a_bian"> 
     <li style="float: left;"><a href="stjbxx"><span>基本信息</span></a>&nbsp;&nbsp;|&nbsp;&nbsp;</li>
     <li style="float: left;"><span>尸表检验</span>&nbsp;&nbsp;|&nbsp;&nbsp;</li>
     <li style="float: left;"><a href="stjpxx"><span>解剖检验</span></a>&nbsp;&nbsp;|&nbsp;&nbsp;</li>
     <li style="float: left;"><a href="stzpxx"><span>尸检照片</span></a></li>
   </ul>
   </div>
   <form>
    <table class="xk_table">
     <tr>
       <td class="xk_label" colspan="6">尸表检验信息</td>
     </tr> 
     <tr>
      <td class="xk_label">尸体概貌</td>
      <td colspan="5">
       <span style="margin-left: 10px;">尸长：</span><input type="text" class="xk_input" name="bodyLength" placeholder="厘米" style="width: 8%;">
       <span>肤色：</span><input type="text" class="xk_input" name="skinColor" style="width: 8%;">
       <span>发育：</span><input type="text" class="xk_input" name="growth" style="width: 8%;">
       <span>营养：</span><input type="text" class="xk_input" name="nutrition" style="width: 8%;">
      </td>
     </tr>
     <tr>
      <td class="xk_label" rowspan="2">尸斑</td>
      <td colspan="5">
       <span style="margin-left: 10px;">尸斑状况：</span><input type="text" class="xk_input" name="" style="width: 39%;">   
      </td>
     </tr>
     <tr>
      <td>
       <span style="margin-left: 10px;">尸斑颜色：</span><input type="text" class="xk_input" name="stainColor" style="width: 8%;">
       <span>尸斑部位：</span><input type="text" class="xk_input" name="stainBw" style="width: 8%;">
       <span>尸斑指压：</span><input type="text" class="xk_input" name="stainZy" style="width: 8%;">
      </td>
     </tr>
     <tr>
      <td class="xk_label" rowspan="3">尸僵</td> 
      <td colspan="5">
       <span style="margin-left: 10px;">尸斑状况：</span><input type="text" class="xk_input" name="" style="width: 39%;">     
      </td>  
     </tr>
     <tr>
      <td>
       <span style="margin-left: 10px;">颌：</span><input type="text" class="xk_input" name="rigidityHe" style="width: 12%;">
       <span>颈 ：</span><input type="text" class="xk_input" name="rigidityJing" style="width: 12%;">
      </td>   
     </tr>
     <tr>
      <td>
       <span style="margin-left: 10px;">上肢：</span><input type="text" class="xk_input" name="rigiditySz" style="width: 12%;">
       <span>下肢 ：</span><input type="text" class="xk_input" name="rigidityXz" style="width: 12%;">
        <span>强度 ：</span><input type="text" class="xk_input" name="rigidityQd" style="width: 12%;">
      </td>    
     </tr>
    <tr>
     <td class="xk_label" rowspan="2">尸体温度</td>
     <td>
       <span style="margin-left: 10px;">第一次 时间：</span><input type="text" class="xk_input" name="measuringTime1" style="width: 12%;">
       <span>环境温度 ：</span><input type="text" class="xk_input" placeholder="℃" name="envTemperature1" style="width: 12%;">
        <span>尸体温度 ：</span><input type="text" class="xk_input" placeholder="℃" name="bodyTemerature1" style="width: 12%;">
        <span>环境湿度 ：</span><input type="text" class="xk_input" placeholder="％RH " name="envSd1" style="width: 12%;">
     </td>      
    </tr>
    <tr>
     <td>
       <span style="margin-left: 10px;">第一次 时间：</span><input type="text" class="xk_input" name="measuringTime2" style="width: 12%;">
       <span>环境温度 ：</span><input type="text" class="xk_input" placeholder="℃" name="envTemperature2" style="width: 12%;">
        <span>尸体温度 ：</span><input type="text" class="xk_input" placeholder="℃" name="bodyTemerature2" style="width: 12%;">
        <span>环境湿度 ：</span><input type="text" class="xk_input" placeholder="％RH " name="envSd2" style="width: 12%;">
     </td>    
    </tr>
    <tr>
     <td class="xk_label">尸体状况</td>
     <td colspan="5">
      <input type="text" class="xk_input" name="bodyInfo" id="stzk_val" key="" readonly="readonly" style="width: 90%;">
      <svg class="icon" aria-hidden="true" id="stzk">
        <use xlink:href="#icon-shujuzidian"></use>
      </svg>     
     </td>    
    </tr>
    <tr>
     <td class="xk_label">尸体昆虫情况</td>
      <td colspan="5"><textarea type="text" class="xk_input_textarea" name="insectInfo"></textarea></td>
    </tr>
    <tr>
     <td class="xk_label" rowspan="10">头面部</td>
     <td>
      <span style="margin-left: 10px;">发色：</span><input type="text" class="xk_input" name="hairColor" style="width: 15%;">
      <span>发型：</span><input type="text" class="xk_input" name="hairStyle" style="width: 15%;">
      <span>长：</span><input type="text" class="xk_input" name="hairLength" placeholder="毫米" style="width: 15%;">
     </td>  
    </tr>
    <tr>
     <td>
      <span style="margin-left: 10px;">面色：</span><input type="text" class="xk_input" name="faceColor" style="width: 15%;">
      <span>眼角膜：</span><input type="text" class="xk_input" name="cornea" style="width: 15%;">
     </td>   
    </tr>
    <tr>
     <td>
      <span style="margin-left: 10px;">眼球：</span><input type="text" class="xk_input" name="eyeball" style="width: 15%;">
      <span>是否闭合：</span><select style="width: 15%;" class="xk_input" name="eyeIfclose"><option value="0"></option><option value="1">是</option><option value="2">否</option></select>
     </td>   
    </tr>
    <tr>
     <td>
      <span style="margin-left: 10px;">瞳孔：</span><span style="margin-left: 124px;">左</span><input type="text" class="xk_input" name="pupilLeft" style="width: 15%;">
      <span style="margin-left: 10px;"><span>右</span><input type="text" class="xk_input" name="pupilRight" style="width: 15%;">
     </td>   
    </tr>
    <tr>
     <td>
      <span style="margin-left: 10px;">外耳道：</span><span style="margin-left: 124px;">左</span><input type="text" class="xk_input" name="canalLeft" style="width: 15%;">
      <span style="margin-left: 10px;"><span>右</span><input type="text" class="xk_input" name="canalRight" style="width: 15%;">
     </td>   
    </tr>
    <tr>
     <td>
      <span style="margin-left: 10px;">球睑结合膜：</span><span style="margin-left: 124px;">左</span><input type="text" class="xk_input" name="leftBallLidFilm" style="width: 15%;">
      <span style="margin-left: 10px;"><span>右</span><input type="text" class="xk_input" name="rightBallLidFilm" style="width: 15%;">
     </td>   
    </tr>
    <tr>
     <td>
      <span style="margin-left: 10px;">耳廓：</span><input type="text" class="xk_input" name="auricle" style="width: 15%;">
      <span>外鼻：</span><input type="text" class="xk_input" name="externalNose" style="width: 15%;">
      <span>鼻腔：</span><input type="text" class="xk_input" name="nasalCavity" style="width: 15%;">
     </td>   
    </tr>
    <tr>
     <td>
      <span style="margin-left: 10px;">口唇：</span><input type="text" class="xk_input" name="lips" style="width: 15%;">
      <span>口腔：</span><input type="text" class="xk_input" name="mouthCavity" style="width: 15%;">
      <span>舌：</span><input type="text" class="xk_input" name="tongue" style="width: 15%;">
     </td>   
    </tr>
    <tr>
     <td>
      <span style="margin-left: 10px;">牙齿：</span><input type="text" class="xk_input" name="tooth" style="width: 15%;">
      <span>齿龈：</span><input type="text" class="xk_input" name="gingiva" style="width: 15%;">
     </td>   
    </tr>
    <tr>
     <td><span style="margin-left: 10px;">其他：</span><input type="text" class="xk_input" name="headOther"></td>
    </tr>
    <tr>
     <td class="xk_label">面部损伤情况</td>
      <td colspan="5"><textarea type="text" class="xk_input_textarea" name="faceInjureCondition"></textarea></td>
    </tr>
    <tr>
     <td class="xk_label">颈项部</td>
      <td colspan="5"><textarea type="text" class="xk_input_textarea" name="neck"></textarea></td>
    </tr>
    <tr>
     <td class="xk_label">胸部</td>
      <td colspan="5"><textarea type="text" class="xk_input_textarea" name="chest"></textarea></td>
    </tr>
    <tr>
     <td class="xk_label">腹部</td>
      <td colspan="5"><textarea type="text" class="xk_input_textarea" name="belly"></textarea></td>
    </tr>
    <tr>
     <td class="xk_label">背臀部</td>
      <td colspan="5"><textarea type="text" class="xk_input_textarea" name="back"></textarea></td>
    </tr>
    <tr>
     <td class="xk_label">四肢部</td>
      <td colspan="5"><textarea type="text" class="xk_input_textarea" name="limbs"></textarea></td>
    </tr>
    <tr>
     <td class="xk_label">生殖器</td>
      <td colspan="5"><textarea type="text" class="xk_input_textarea" name="genitalOrgan"></textarea></td>
    </tr>
    <tr>
     <td class="xk_label">肛门</td>
      <td colspan="5"><textarea type="text" class="xk_input_textarea" name="anus"></textarea></td>
    </tr>
    <tr>
     <td class="xk_label">其它</td>
      <td colspan="5"><textarea type="text" class="xk_input_textarea" name="other"></textarea></td>
    </tr>
    </table>   
   </form>
  </div>    
 </div>
 <!-- 尸体状况树 -->
<div id="div_stzk_tree" class="easyui-dialog" closed="true">
 <div>
  <input type="text" class="xk_input96" readonly="readonly" name="" parentKey="" childKey="" key="" id="stzk_vals" style="margin-left: 1%;">
  <ww:hidden name="itemskeybox" id="selectedKeys"/>
 </div> 
 <ul id="stzk_tree" style="width: 50%;float: left;margin-top: 1px;"></ul>
 <ul style="width: 50%;float: right;margin-top: 4px;" id="ul_stzk_chanyong">
   <li key="0">常用项</li>
 </ul>
</div> 
</body>
<script type="text/javascript" src="jquery-easyui-1.5.3/jquery.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.5.3/jquery.easyui.min.js"></script>
<script type="text/javascript">
var x = $(".xk_submit").height();
 $(".xk_submit").css({"bottom":"0","left":"0","right":"0","position":"fixed"})
 $(".content").css('margin-bottom',x);
$("#a_bian li:eq(1)").css("color","red");
var stzk_my_array = new Array();
var stzk_value_array = new Array();
var stzk_changyong_vals = new Array();
var stzk_cy_prarent_vals = new Array();
stzk_i = 0;
stzk_j = 0;
stzk_cy_i = 0;
stzk_cy_j = 0;
var stzk_parentValue = "";
var stzk_value = "";
var stzk_key = "";
//对于重复选择的值,不保存
function stzk_RecHasThe(s){
  for (i = 0; i < stzk_my_array.length; i++)
   {
     if( stzk_my_array[i] == s)      return false;     
   }
  return true;
}

$("#stzk").click(function(){
  $("#div_stzk_tree").dialog({
  title:"尸体状况多选字典",
  width:"1200px",
  height:"600px",
  closed: false,
  buttons:[
  {
    text:"提交",
    iconCls:"icon-save",
    handler:function(){
      var val = $("#stzk_vals").val();
      $("#stzk_val").val(val);
      $("#div_stzk_tree").dialog("close");
    }
  },
  {
  text:"清空",
  iconCls:"icon-redo",
  handler:function(){
    stzk_my_array = [];
    stzk_value_array= [];
    stzk_changyong_vals= [];
    stzk_cy_prarent_vals= [];
    stzk_i = 0;
    stzk_j = 0;
    stzk_cy_i = 0;
    stzk_cy_j = 0;
    $("#stzk_vals").val("");;
  }
  },{
  text:"设为常用",
  iconCls:"icon-large-smartart",
  handler:function(){
    if(stzk_parentValue != null && stzk_parentValue.length != 0){
      if (stzk_value != null && stzk_value.length!= 0){
        for(var i = 0;i<=stzk_changyong_vals.length;i++){
          if(stzk_changyong_vals.indexOf(stzk_value) != -1){
            return false;
          }else{
            stzk_changyong_vals[stzk_cy_i++] = stzk_value;
            for(var c = 0;c<=stzk_cy_prarent_vals.length;c++){
              if(stzk_cy_prarent_vals[c] == stzk_parentValue){
                break;
              }else{
                stzk_cy_prarent_vals[stzk_cy_j++] = stzk_parentValue;
                break;
              }
            }
            $("#ul_stzk_chanyong").append("<li key='"+stzk_key+"' parentValue="+stzk_parentValue+" onclick='stzk_changyong_val(this)'><button class='easyui-linkbutton' onclick='stzk_changyong_del(this)' type='button' iconCls='icon-no'></button>"+
            "<a href='javascript:;'>"+stzk_value+"</a></li>");
            $.parser.parse("#ul_stzk_chanyong");
          }
        }
      }
    }
  }
 }
 ],
 });  
//尸体状况树
$("#stzk_tree").tree({
  url:'json/stzk_tree.json',
 method:"get",
  onLoadSuccess:function(){  
   $("#stzk_tree").tree("collapseAll");  
  },
  onDblClick: function(node){
  if($('#stzk_tree').tree('isLeaf',node.target)){
      stzk_parentValue = $('#stzk_tree').tree("getParent",node.target).text;
      stzk_value = node.text;
     //var parentId = $('#ajxz_tree').tree("getParent",node.target).id;
      stzk_key = node.id;

  if(stzk_RecHasThe(stzk_value)){  
     if (stzk_value != "") {
        stzk_my_array[stzk_i++] = stzk_value;
        if (stzk_parentValue == null || stzk_parentValue == "") {
            stzk_value_array[stzk_j++] = stzk_value;
        } else {
            if (stzk_j == 0) {
                stzk_value_array[stzk_j++] = stzk_parentValue + "：" + stzk_value;
            } else {
                var flag = false;
                for (var k = 0; k < stzk_value_array.length; k++) {
                    var tempValue = stzk_value_array[k];
                    if (tempValue.indexOf(stzk_parentValue) != -1) {
                        stzk_value_array[k] = stzk_value_array[k] + "、" + stzk_value;
                        flag = true;
                        break;
                    } 
                }
                if (!flag) stzk_value_array[stzk_j++] = stzk_parentValue + "：" + stzk_value;
            }
        }
        var totalvalue = stzk_value_array.join("，");
         $("#stzk_vals").val(totalvalue);;
    }
  }
  }
 },
 onClick: function(node){
   if($('#stzk_tree').tree('isLeaf',node.target)){
     stzk_parentValue = $('#stzk_tree').tree("getParent",node.target).text;
      stzk_value = node.text;
     //var parentId = $('#ajxz_tree').tree("getParent",node.target).id;
      stzk_key = node.id;

  }
 }
});
$('#div_stzk_tree').dialog('open'); //打开添加对话框
$('#div_stzk_tree').window('center');//使Dialog居中显示  
}); 
//删除尸体状况常用项
function stzk_changyong_del(obj){
 $.messager.confirm("操作提示","确定要删除该常用项吗？",function (data){
  if(data){
   var val = obj.nextSibling.innerText;
   for(var i = 0;i<stzk_changyong_vals.length;i++){
    if(stzk_changyong_vals[i] == val){
      stzk_changyong_vals.splice(i,1);
    }
   }
   obj.parentNode.remove();
  }
 });
}
//给尸体状况框赋选定常用值
function stzk_changyong_val(obj){
  var val_val = obj.attributes.parentvalue.value;
  var val = obj.childNodes[1].innerText;
   if(stzk_RecHasThe(val)){  
     if (val != "") {
        stzk_my_array[stzk_i++] = val;
        if (val_val == null || val_val == "") {
            stzk_value_array[stzk_j++] = val;
        } else {
            if (stzk_j == 0) {
                stzk_value_array[stzk_j++] = val_val + "：" + val;
            } else {
                var flag = false;
                for (var k = 0; k < stzk_value_array.length; k++) {
                    var tempValue = stzk_value_array[k];
                    if (tempValue.indexOf(val_val) != -1) {
                        stzk_value_array[k] = stzk_value_array[k] + "、" + val;
                        flag = true;
                        break;
                    } 
                }
                if (!flag) stzk_value_array[stzk_j++] = val_val + "：" + val;
            }
        }
        var totalvalue = stzk_value_array.join("，");
         $("#stzk_vals").val(totalvalue);;
    }
  }
}  
</script>
</html>